import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from '@/router/index.js'
import ElementUI from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElIcons from '@element-plus/icons'
import './permission'
import 'font-awesome/css/font-awesome.css'
import * as directives from '@/directives/index.js'
import { createPinia } from 'pinia'
import 'virtual:windi.css'
import store from './store'
import Cookies from 'js-cookie'
const pinia = createPinia()
const app = createApp(App)
// 全局挂载变量Cookies
app.config.globalProperties.Cookies = Cookies
app.use(router).use(ElementUI).use(store).use(pinia).mount('#app')
console.log('directives=',directives);
Object.keys(directives).forEach(key => {
    app.directive(key, directives[key])
});
Object.keys(ElIcons).forEach((key) => {
    app.component(key, ElIcons[key])
})
console.log('import.meta.env=', import.meta.env)
console.log('cookie=', Cookies.get('name'))